<?php

namespace App\Models\Enum;

/**
 * 判断
 */
class Judge
{
    const YES = 1;
    const NO = 2;

    public static function get($type)
    {
        switch ($type) {
            case self::YES:
                return '是';
            case self::NO:
                return '否';
            default:
                return '类型未定义';
        }
    }

    public static function getAll()
    {
        return [
            self::YES => self::get(self::YES),
            self::NO => self::get(self::NO),
        ];
    }
}